﻿@model ZoomLa.Model.M_Arrive
@{ 
    
}
    @section head{<title>优惠券管理</title>}
    @section content{
<div id="pageflag" data-nav="shop" data-ban="shop"></div>
<div class="container margin_t5">
    <ol class="breadcrumb">
        <li><a href="@Url.Action("Default","")">会员中心</a></li>
        <li><a href="@Url.Action("ArriveManage")">优惠券管理</a></li>
        <li class="active"><a href="@Request.RawUrl">编辑优惠券</a></li>
    </ol>
</div>
<div class="container margin_t5">
<form method="post" action="@MVCHelper.GetAction("Arrive_Add",Request)">
<table class="table table-striped table-bordered">
    <tr>
        <td><strong>卡别名：</strong></td>
        <td>
            <input type="text" ID="ArriveName" name="ArriveName" class="form-control text_300 required" value="@Model.ArriveName" />
        </td>
    </tr>
    <tr>
        <td><strong>优惠金额：</strong></td>
        <td>
            <input type="text" id="Amount" name="Amount" class="form-control text_300 required num" value="@Model.Amount" disabled="disabled" />
        </td>
    </tr>
    <tr>
        <td><strong>适用金额范围：</strong></td>
        <td>
            <div class="input-group text_300">
                <input type="text" id="MinAmount" name="MinAmount" class="form-control" MaxLength="10" value="@Model.MinAmount"/>
                <span class="input-group-addon">到</span>
                <input type="text" id="MaxAmount" name="MaxAmount" class="form-control" MaxLength="10" value="@Model.MaxAmount"/>
            </div>
            <div class="rd_green">*如输入(200-300)则只有200-300单价商品(或订单）才能使用，不填则代表不限制(优先匹配下方的商品绑定逻辑，如未绑定商品则此金额为订单总额限制）。</div>
    </tr>
    <tr>
        <td><strong>生效时间：</strong></td>
        <td>
            @Html.TextBoxFor(p=>p.AgainTime,new { Value = Model.AgainTime.ToString("yyyy/MM/dd"),
        onclick = "WdatePicker({ dateFmt: 'yyyy/MM/dd'});",@class="form-control text_300 required date" })
        </td>
    </tr>
    <tr>
        <td><strong>到期时间:</strong></td>
        <td>
            @Html.TextBoxFor(p => p.EndTime, new { Value = Model.EndTime.ToString("yyyy/MM/dd"),
        onclick = "WdatePicker({ dateFmt: 'yyyy/MM/dd'});",@class="form-control text_300 required date" })
        </td>
    </tr>
    <tr>
        <td></td>
        <td>
            <input type="submit" class="btn btn-primary" value="保存信息" />
            <a href="ArriveManage" class="btn btn-default">返回列表</a>
        </td>
    </tr>
</table>
<input type="hidden" id="UserID_Hid" name="UserID_Hid" />
</form>
</div>
}
@section script{
<link href="/dist/css/bootstrap-switch.min.css" rel="stylesheet" />
<script src="/JS/Controls/ZL_Dialog.js"></script>
<script src="/JS/DatePicker/WdatePicker.js"></script>
<script src="/JS/Controls/ZL_Array.js"></script>
<script src="/JS/SelectCheckBox.js"></script>
<script src="/dist/js/bootstrap-switch.js"></script> 
<script>
    function closeDiag() { CloseComDiag(); }
        function SelUser() {
            comdiag.maxbtn = false;
            ShowComDiag("/Common/Dialog/SelGroup.aspx", "选择用户");
        }
        function delUser(btn, uid) {
            var $hid = $("#UserID_Hid");
        $(btn).closest("tr").remove();
            var ids = idshelp.del($hid.val(), uid);
        $hid.val(ids);
        }
        function UserFunc(list, select) {
            var ids = idshelp.merge(list.GetIDS("UserID"), $("#UserID_Hid").val());
        $("#upro_wrap").load("/common/comp/UserList.aspx?del=delUser", { "ids": ids });
        $("#UserID_Hid").val(ids);
            CloseComDiag();
        }
    $(function () {
        // if ("<%:Mid%>" != "0") { $(".view_add").hide(); }
        $("form").validate();
        })
</script>
}